
import request from "@/util/request.js"

const login = (loginName,loginPwd)=>{
	return request({
        url:"login/login",
		data:{loginName,loginPwd},
		method:'post'
    })
}

const getAll = ()=>{
    return request({
        url:"Login/getAll",
    })
}

const query=(data)=>{
	return request({
		url:'Login/Query',
		params:data,
	})
}

const get=(data)=>{
	return request({
		url:'Login/get',
		params:data,
	})
}

const Update=(data)=>{
	return request({
		url:'Login/Update',
		method:"post",
		data:data,
	})
}

const add=(data)=>{
	return request({
		url:'Login/Add',
		method:"post",
		data:data,
	})
}

const Delete=(id)=>{
	return request({
		url:"Login/"+id,
		method:"Delete"
	})
}
const UpPwd = (oPwd,nPwd)=>{
    return request({
        url:"/LogIn/UpPwd",
		method:"post",
		data:{ypwd:oPwd,xpwd:nPwd},
    })
}
export default {
	login,
    getAll,
	query,
	get,
	add,
	Delete,
	Update,UpPwd
}